package user;

import java.sql.ResultSet;
import java.sql.SQLException;

public class RestaurantOwner extends User{
	
	public RestaurantOwner() {
		super();
	}
	
	public String getTruePassword() {	
		DBConnector db = DBConnector.getDBConnector();
		String sql = "select rest_passcode from restaurant where rest_login_name = '" + username + "';";

		ResultSet result = db.query(sql);
		try {
			if(result.next()) {
				return result.getString(1);
			} else
				return null;
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return null;
	}

}
